# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-cachetools
pkgver=5.3.0
pkgrel=2
pkgdesc="Extensible memoizing collections and decorators"
url="https://github.com/tkem/cachetools"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest-runner')
source=("$pkgname-$pkgver.tar.gz::https://github.com/tkem/cachetools/archive/v$pkgver.tar.gz")
sha512sums=('6b600f48f28b98c5480a1952317c2f27c132cf609c6651e66165351f23fba6c028cdbf1bba0f2159a622d8cd3db9bfa09dde7e08e15929336e82358f61e495bc')

build() {
  cd "$srcdir"/cachetools-$pkgver
  python setup.py build
}

check() {
  cd "$srcdir"/cachetools-$pkgver
  python setup.py pytest
}

package() {
  cd cachetools-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
